package org.example.sort;

import org.example.Student;
import org.example.innerclass.A;

import java.util.*;

public class Main {
    public static void main(String[] args) {
//        Student st1= new Student(1,"zs",20,"男");
//        Student st2= new Student(2,"ls",23,"男");
//        Student st3= new Student(3,"ww",21,"男");
//        Student st4= new Student(4,"zl",18,"男");
//        List<Student> stuList = new ArrayList<>();
//        Collections.addAll(stuList,st1,st2,st3,st4);
//        System.out.println(stuList);
//        Collections.sort(stuList, new Comparator<Student>() {
//            @Override
//            public int compare(Student o1, Student o2) {
//                return o2.getId()-o1.getId();
//            }
//        });
//        System.out.println(stuList);
        List<String> list1 = Arrays.asList("zs", "ls", "ww");
        list1.add("aa");
        List<Integer> list = Arrays.asList(1, 7, 34, 5, 2);
        List<Integer> list2 = new ArrayList<>(list);
        list2.add(34);
        LinkedList<Integer> list3 = new LinkedList<>(list2);

        System.out.println(list3);

    }
}
